const app = getApp()

Page({
  data: {
    item: {}
  },
  onLoad: function (options) {
    this.getDetail(options.id)
  },
  async getDetail (id) {
    const res = await app.http.get('/api/v1/getShopDetails?id=' + id)
    if (res.code == 0) {
      this.setData({ item: res.data })
    } else {
      app.helper.msg(res.message)
    }
  },
  preview (e) {
    wx.previewImage({
      urls: [e.currentTarget.dataset.src],
    })
  },
  onShareAppMessage: function () {

  }
})